package com.lxj.student_security.controller;

import com.lxj.student_security.common.CommonResult;
import com.lxj.student_security.entity.Sign;
import com.lxj.student_security.service.SignService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/sign")
public class SignController {
    @Autowired
    private SignService signService;
    /**
     * 保存点到记录
     */
    @PostMapping("/add")
    public CommonResult add(Sign sign){
       return signService.add(sign);
    }
    /**
     * 查询小组
     */
    @PostMapping("/selectGroup")
    public CommonResult selectGroup(){
        return signService.selectGroup();
    }
    @PostMapping("/selectAll")
    public CommonResult selectAll(Sign sign){
        return signService.selectAll(sign);
    }
    @PostMapping("/signInDelete")
    public CommonResult delete(Integer[] id){
        return signService.delete(id);
    }
    @PostMapping("/findById")
    public CommonResult findById(Integer id){
        return signService.findById(id);
    }
    @PostMapping("/edit")
    public CommonResult edit(Sign sign){
        return signService.edit(sign);
    }
}
